export default {
    ssr: false,

    target: 'static',

    router: {
        base: process.env.ENV_CONFIG === 'dev' ? '/akeeps' : '',
    },

    server: {
        host: '0.0.0.0',
        port: 8090
    },

    head: {
        title: 'AKeepS - 电商全域运营系统与供应链服务商',
        htmlAttrs: {
            lang: 'zh-CN'
        },
        meta: [
            {charset: 'utf-8'},
            {'http-equiv': 'cache-control', content: 'no-cache'},
            {'http-equiv': 'Pragma', content: 'no-cache'},
            {'http-equiv': 'Expires', content: '0'},
            {name: 'viewport', content: 'width=device-width, initial-scale=1'},
            {hid: 'description', name: 'description', content: ''},
            {name: 'format-detection', content: 'telephone=no'},
            {
                name: 'viewport',
                content: 'width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0'
            }
        ],
        link: [
            {rel: 'icon', type: 'image/x-icon', href: './favicon.png'}
        ],
        script: []
    },

    css: [
        'vant/lib/index.css',
    ],

    plugins: [
        '@/plugins/framework-install'
    ],

    components: true,

    modules: [],

    build: {
        babel: {
            presets: ['@babel/preset-env'],
        },

        postcss: {
            plugins: {
                'tailwindcss': {
                    important: true,
                    mode: 'jit',
                    content: [
                        './pages/**/*.{vue,js,ts,jsx,tsx}',
                        './components/**/*.{vue,js,ts,jsx,tsx}',
                        './layouts/**/*.{vue,js,ts,jsx,tsx}',
                    ],
                    theme: {
                        extend: {}
                    },
                    plugins: [],
                    corePlugins: {
                        preflight: false
                    }
                },
                'postcss-px2rem': {remUnit: 50},
                // 'postcss-less': {}
            },
            preset: {
                autoprefixer: {
                    grid: true
                }
            }
        },

        transpile: [/.+/],
    },

    env: {
        ENV_CONFIG: process.env.ENV_CONFIG
    }
}
